package com.atguigu.java4;

public class Bank {
		
		private Customer[] customers;
		private int numberOfCustomer;
		
		public  Bank(){
				customers =  new Customer[10];
		}
		
		public void addCustomer(String f, String l){
			
			//this.customers[numberOfCustomer] = new  Customer(f,l);
			//numberOfCustomer  ++;
			//添加用户
			Customer cust  =  new Customer(f,l);
			customers[numberOfCustomer++] = cust;
		}
		
		public  int  getNumOfCustomers(){
			//获取用户数量
				return this.numberOfCustomer;
		}
		
		public Customer  getCustomer(int index){
				//获取用户信息
				return customers[index];
		}
}
